import { AxiosRequestConfig, AxiosResponse } from "axios";
import { RequestOptions, Result } from "./types";

export abstract class AxiosProcessor {
  beforeRequestHook?: (
    config: AxiosRequestConfig,
    options: RequestOptions
  ) => AxiosRequestConfig;
  transformRequestData?: (
    res: AxiosResponse<Result>,
    options: RequestOptions
  ) => any;
  requestInterceptors?: (config: AxiosRequestConfig) => AxiosRequestConfig;
  responseInterceptors?: (res: AxiosResponse<any>) => AxiosResponse<any>;
  responseInterceptorsCatch?: (error: Error) => void;
}
